
#ifndef __HTTP_CLIENT_H__
#define __HTTP_CLIENT_H__
#pragma once

#include <wininet.h>


class CHttpRequest
{
public:
	CHttpRequest();
private:

};

class CHttpResponse
{
public:
	CHttpResponse();
private:
};

class CHttpClient
{
public:
	CHttpClient();
	~CHttpClient();

	void SetProxy(CStringA const&, CStringA const&);
	BOOL Create(DWORD dwAccessType, DWORD dwFlag);

	BOOL Connect(CString const&, INTERNET_PORT wPort = INTERNET_DEFAULT_HTTP_PORT);
	BOOL Connect(CString const&, INTERNET_PORT wPort, CString const&, CString const&, DWORD dwContext);
	

	BOOL Get(CHttpRequest const&, CHttpResponse&);
	BOOL Post(CHttpRequest const&, CHttpResponse&);

	CString GetUserAgent() const;
private:
	HINTERNET	m_hInternet;
	HINTERNET	m_hSession;

private:
	CString		m_strProxy;
	CString		m_strProxyByPass;

};

#endif